package com.cssw.fyzb.busi.service.user;

import com.cssw.fyzb.core.dao.user.UserRelDao;
import com.cssw.fyzb.core.dao.video.CmfUsersVideoDao;
import com.cssw.fyzb.core.mao.user.UserMao;
import com.cssw.fyzb.core.model.mos.UserMo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @author Feng Chen
 */
@Service
public class UserRelServiceImpl implements UserRelService {

    private static final Logger logger = LoggerFactory.getLogger(UserServiceImpl.class);

    @Autowired
    private UserRelDao userRelDao;

    @Autowired
    private CmfUsersVideoDao cmfUsersVideoDao;

    @Autowired
    private UserMao userMao;

    @Override
    public Integer getFansNum(Long userId) {
        return userRelDao.getFansNum(userId);
    }

    @Override
    public Integer getFollowNum(Long userId) {
        return userRelDao.getFollowNum(userId);
    }

    @Override
    public Integer getFriendNum(Long userId) {
        return userRelDao.getFriendNum(userId);
    }

    @Override
    public Long getRelType(Long userId, Long relUserId) {
        return userRelDao.getRelType(userId, relUserId);
    }

    @Override
    public Integer cmfCount(Long userId) {
        return cmfUsersVideoDao.cmfCount(userId);
    }

    @Override
    public UserMo findByUserId(Long userId) {
        return userMao.findByUserId(userId);
    }


}
